How does filtering work with Algolia? Learn how Algolia enables filtered searches.
filterOnly
modifier.
This reduces the index size and improves search speed.
For example, if you plan to filter on an attribute, such as color
, but don’t need to calculate or display the number of items with color:green
, color:blue
, or similar, use filterOnly
.
numericFilters
to filter on numeric or boolean attributes, you don’t need to set these attributes as attributesForFaceting
.brand
and price_range
, you’ll always want to display a list of brands and a price range slider for every query in your UI.
For example, a search for “phones” returns brands like Apple and Samsung, while a search for “speakers” returns Panasonic and Bose.
While the values may change, the brand
filter is always present.